﻿<AttributeUsage(AttributeTargets.Property, Inherited:=False, AllowMultiple:=False)> _
Public NotInheritable Class DateDetailsAttribute
    Inherits Attribute

    Public Property DateImportant As Boolean = False

    Public Property TimeImportant As Boolean = False

    Public Sub New(ByVal dateImportant As Boolean, ByVal timeImportant As Boolean)

        If Not dateImportant AndAlso Not timeImportant Then
            Throw New Exception("The date and time cannot both be unimportant.")
        End If

        Me.DateImportant = dateImportant
        Me.TimeImportant = timeImportant

    End Sub

End Class

